Skip to content

Fix for old/wrong values being returned when triggered by device orientation change - #3

Open
turley wants to merge 1 commit into
pjjanak:masterfrom
turley:fix-observed-notification
Open

Fix for old/wrong values being returned when triggered by device orientation change#3
turley wants to merge 1 commit into
pjjanak:masterfrom
turley:fix-observed-notification

Conversation

@turley

@turley turley commented May 10, 2015

Copy link
Copy Markdown

I discovered that in some cases, UIDeviceOrientationDidChangeNotification is being sent before the screen's applicationFrame is updated, causing bad (old) dimension values to be reported to event listeners.

By observing UIApplicationDidChangeStatusBarOrientationNotification instead, the values for applicationFrame appear to be more reliable in reflecting changes to the application's frame.

@DanilloCorvalan

Copy link
Copy Markdown

Don't know if it was meant to be that way- you should call ViewPort.getDimensions on the event trigger because you can still know the old screen size value.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants